<?php
declare (strict_types=1);

namespace Plugin\File\Model;

use Mine\MineModel;

class RdFilePlaybackVideo extends MineModel
{
    /**
     * The table associated with the model.
     *
     * @var string|null
     */
    protected ?string $table = 'rd_file_playback_video';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected array $fillable = [
        'id', 'file_url', 'yj_data_id', 'created_at', 'updated_at'
    ];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected array $casts = [
        'created_at' => 'datetime',
        'updated_at' => 'datetime',
        'id' => 'integer',
    ];

    /**
     * 可能与报警回调通过 yj_data_id 关联（非强约束）
     */
    public function alarmMsg()
    {
        return $this->hasOne(\Plugin\Alarm\Model\RdAlarmMsg::class, 'yj_data_id', 'yj_data_id');
    }

    
}